.html.resources/D32283D3-81AC-4F38-B00B-8EC21C343C2B.png)
R1: NTP+CA server //NTP optional
clock set HH:MM:SS day month year
clock timezone IST 5 30 //optional
ntp master 1 //NTP STRATUM no. lower number will be preferred
ntp authenticate //optional for security
ntp trusted-key 1
ntp authentication-key 1 md5 cisco
!
ip domain-name cisco.com
!
crypto key generate rsa modulus 1024 //to generate private KEY
!
crypto pki server IOSCA //pki - public key infrastructure
issuer-name CN=IOSCA.cisco.com L=Bangalore C=India //x.509 format
grant auto //if client request server provides cert automatically
lifetime certificate 2 //validity for client certificates
lifetime ca-certificate 1 //validity for self-signed server certificates
cdp-url http://10.1.1.1 //ip address for client to request
database url flash:// //to store certificates
no shutdown //to activate pki server
Password:cisco123
Re-enter password: cisco123
% Generating 1024 bit RSA keys, keys will be non-exportable...[OK]
% Exporting Certificate Server signing certificate and keys...
% Certificate Server enabled.
ip http server
Dec 2 10:42:03.895: %PKI-6-CS_ENABLED: Certificate server now enabled.
Verification:
show ntp status
In R2:
clock timezone IST 5 30
ntp trusted-key 1
ntp authentication-key 1 md5 cisco
ntp server 10.1.1.1
!
ip domain-name cisco.com
!
crypto key generate rsa modulus 1024
The name for the keys will be: IPsecPeer1.cisco.com
!
crypto pki trustpoint MyCA
enrollment url http://10.1.1.1:80 //SCEP uses http to carry certificates
revocation-check crl none or http://.......
!
crypto pki authenticate MyCA
% Do you accept this certificate? [yes/no]: yes
Trustpoint CA certificate accepted.
!
crypto pki enroll MyCA
Password:ciscoabc
Re-enter password: ciscoabc
% The subject name in the certificate will include: IPsecPeer1.cisco.com
% Include the router serial number in the subject name? [yes/no]: no
% Include an IP address in the subject name? [no]: no
Request certificate from CA? [yes/no]: yes
In R3
clock timezone IST 5 30
ntp trusted-key 1
ntp authentication-key 1 md5 cisco
ntp server 10.1.1.1
!
ip domain-name cisco.com
!
crypto key generate rsa modulus 1024
The name for the keys will be: IPsecPeer1.cisco.com
!
crypto pki trustpoint MyCA
enrollment url http://10.1.1.1:80 //SCEP uses http to carry certificates
revocation-check crl none or http://.......
!
crypto pki authenticate MyCA
% Do you accept this certificate? [yes/no]: yes
Trustpoint CA certificate accepted.
!
crypto pki enroll MyCA
Password:ciscoabc
Re-enter password: ciscoabc
% The subject name in the certificate will include: IPsecPeer1.cisco.com
% Include the router serial number in the subject name? [yes/no]: no
% Include an IP address in the subject name? [no]: no
Request certificate from CA? [yes/no]: yes
Verification:
sh ntp status
Show ntp association
sh cry pki certificates
R1:
crypto isakmp policy 10
Authentication rsa-sig
hash md5
group 2
!
crypto ipsec transform-set TSET esp-des esp-md5-hmac
!
crypto map CMAP 10 ipsec-isakmp
set peer 10.1.1.3
set transform-set TSET
match address 101
!
access-list 101 permit ip 1.0.0.0 0.0.0.255 2.0.0.0 0.0.0.255
!
Inter f0/0
crypto map CMAP
R2:
crypto isakmp policy 20
Authentication rsa-sig
hash md5
group 2
!
crypto ipsec transform-set TSET esp-des esp-md5-hmac
!
crypto map CMAP 10 ipsec-isakmp
set peer 10.1.1.2
set transform-set TSET
match address 101
!
access-list 101 permit ip 2.0.0.0 0.0.0.255 1.0.0.0 0.0.0.255
!
Inter f0/0
crypto map CMAP
Verification:
Show crypto isakmp sa
Show crypto isakmp sa detail
Show crypto ipsec sa
.html.resources/B9E1D3C2-0AD6-40EF-84EC-684788A79D75.png)